home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / System7 tools / S / SpokesDaemon&Spiricom / About S & S (Text) next >
Encoding:
Text File  |  1993-10-19  |  15.4 KB  |  154 lines  |  [TEXT/MSWD]

  1. SpokesDaemon
  2. and 
  3. Spiricom
  4.  
  5. by Eric Weidl
  6. SpokesDaemon Version 1.0, October 1, 1993
  7. Spiricom Version 1.0.1, October 19, 1993
  8.  
  9. About SpokesDaemon and Spiricom
  10. First of all, thanks for your interest in these programs. I hope you find them useful, friendly, and fun.
  11.  
  12. Second, if these programs are redistributed then all documentation must be included and no part of it may be modified without the permission of the author (me).
  13.  
  14. Third, these programs are shareware. I’m asking for (US)$40 for both programs. If you don’t want to, or can’t, pay that amount, please at least send a postcard from wherever you are. The incentive for sending in the shareware fee is that in return I’ll send you an AppleScriptable version of SpokesDaemon. I’ll also include some files from commercial programs, like FileMaker Pro and Excel, demonstrating how to utilize SpokesDaemon with them.
  15.  
  16. SpokesDaemon and Spiricom are two separate programs which together utilize some of Apple's latest technology to enhance your computing experience. 
  17.  
  18. SpokesDaemon is a 'faceless background application' (similar to a  'daemon' on a UNIX computer) which accepts and processes requests from other applications for text-to-speech services. The text-to-speech synthesis is handled by Apple's Speech Manager, which must be installed on your computer for SpokesDaemon to work. The requests are sent to SpokesDaemon via Apple events, which means your Macintosh must be running System 7.0 or later. The name is a play on the word 'spokesperson,' if you were wondering.
  19.  
  20. Spiricom is the program that you can use to communicate with, configure, and test SpokesDaemon. Spiricom is necessary because SpokesDaemon is a 'faceless' application; in other words, SpokesDaemon has no menus, no windows, and no buttons. There is no direct way for the user to manipulate it's settings. If you wish to change the voice SpokesDaemon uses to 'speak' with, you must use Spiricom. A discussion of why I chose this architecture follows later in this document. The name Spiricom is taken from an actual device invented by an electrical engineer from North Carolina in 1975. He claimed the device allowed its user to communicate with the dead, and actually spent several hundred thousand dollars trying to market the device.
  21.  
  22. Requirements
  23. Both programs have a couple requirements which must be satisfied for them to operate properly. Since they are designed to work together, I'll give you the union of their needs:
  24.     • Apple event support (i.e. a Macintosh running System 7.0 or later)
  25.     • Speech Manager 1.0 or later (which of course has it's own requirements!)
  26.  
  27. Unfortunately, I can't supply you with either one of these items. The Mac you can get at your local dealer. As for the Speech Manager software, I could license it from Apple and then distribute it freely with SpokesDaemon and Spiricom, but that would cost $1000, which I don't currently have. You should be able to ftp it from ftp.apple.com if you have access the Internet. AOL and CompuServe users will have to check out their services for the software. 
  28.  
  29. Why two applications?
  30. Now we answer the question, why are there two applications? Is this guy just trying to show off? No, I'm not. There are some significant advantages to faceless background applications (FBA's).  One is that they have reduced memory requirements when compared to an application providing similar functions but with an interface. These two programs are an excellent example of this advantage. SpokesDaemon is 150K on disk and requires a minimum of 120K of RAM when running. Spiricom is 400K on disk and wants at least 500K of RAM. The development system I use (Novell's AppWare) generates applications with exaggerated resource requirements, but the same ratio holds true for other application.
  31.  
  32. Two, because they are Apple event based, FBA's can easily provide services to other applications. Indeed, that is the primary purpose of SpokesDaemon, to provide access to the Speech Manager to any other application supporting Apple events, but whose designers didn't want to learn and add the Speech Manager calls to their application. A computer which made wide use of FBA's would have smaller application sizes and it is argued, operate more efficiently. Bloated, everything-including-the-kitchen-sink applications like Microsoft Word would be unnecessary. 
  33.  
  34. One important limitation of FBA's is that, since they have no interface, the programmer must provide some other mechanism for configuring the daemon (assuming it needs to be configured). I've chosen to write another application to do so, although it could also be done via a Control Panel. Spiricom is the application I wrote to configure and test SpokesDaemon. 
  35.  
  36. Note that you can use any application which can create and send Apple events, like FileMaker Pro 2.0 or Excel 4.0, to control SpokesDaemon; there is nothing inherently better about Spiricom. However, I wanted people to use SpokesDaemon 'out of the box,' so I thought that it was important to include an application which would allow them to do so and demonstrate its capabilities. And that's why there are two applications!
  37.  
  38. SpokesDaemon Details
  39. Not much to say here in terms of the user interface, since there is none. Some practical issues: the application takes about 150K on disk, which is not a huge size, but it is larger than most other FBA's. I'll be able to decrease this in the next version; I'm shooting for 100K. SpokesDaemon wants a minimum 120K RAM partition. I hope to decrease this resource requirement as well in a later version. One thing to realize about FBA's is that they do not appear in the Application menu or in the Finder's About window when they are running. The RAM used by SpokesDaemon is shown as part of the System's memory-use thermometer in the About This Macintosh window. 
  40.  
  41. If you are going to use SpokesDaemon in many applications, you may find it easiest to put it, or an alias to it, in the Startup Items folder of the System Folder. That way, whenever your machine is booted, it will be launched. To quit the application, you can either use Spiricom, another application which can send a 'quit' Apple event, or simply shutdown the machine. If you try to launch it on an System 6 Macintosh or one that doesn't have the Speech Manager loaded, it will simply quit. Unfortunately, you will not be given any notice that it wasn't able to run if there is a problem. I'm working on this issue. (Note: some of you might say, "Well, all I have to do is look at the its icon in the Finder. If it's grayed out, that means it's running." To which I'd reply, "Nice try!" Unfortunately, that won't help, because there is a bug in the Finder (hard to believe but true!) which won't properly redraw a FBA's icon when it is quit.)
  42.  
  43. SpokesDaemon is also scriptable. That means that if you have AppleScript and the ScriptEditor application, you can create AppleScript scripts which control the fba. Several scripts are included in the SpokesDaemon and Spiricom distribution you receive when you pay the shareware fee. Examine them and the aete resource to learn how to use AppleScript with the daemon.
  44.  
  45. Here is the list of Apple events supported by SpokesDaemon: (Apple event purists note: I realize this may not be the best way to present a event suite, but it has suited my short term purpose, and I am working on the template version.)
  46.  
  47. For all events, the Event Class is ‘Spek’.
  48. Event Name        Event ID  Parameters      Reply Parameters
  49. Can Speak            ‘Gest’                   bool:result
  50. Change Voice       ‘CVoc’        TEXT:Voice Name    
  51. Computer Speaking ‘CBsy’                    bool:result
  52. Continue Speech   ‘Cont’        
  53. Convert Text       ‘Conv’        TEXT:text    bool:result
  54. Count Voices       ‘Coun’                    shor:available
  55.                                               voices
  56. Get Modulation       ‘SMod’                     shor:modulation    
  57. Current Date       'Date'        
  58. Current Time       'Time'        
  59. Get Pitch            ‘GPit’                    shor:pitch
  60. Get Rate            ‘GRat’                    shor:rate
  61. Get Voice Info       ‘Info’                    TEXT:name
  62.                                           TEXT:comments
  63.                                           TEXT:gender
  64.                                           TEXT:age
  65. Get Volume       'GVol'                   shor:volume
  66. Pause Speech       ‘Paus’        
  67. Prepare Speech       ‘Prep’        TEXT:text    
  68. Set Char Mode       ‘SChr’     bool:mode    
  69. Set Input Mode       ‘SInt’        bool:mode    
  70. Set Interrupt       ‘Intr’        bool:mode    
  71. Set Modulation       ‘SMod’        shor:new modulation    
  72. Set Number Mode   ‘SNum’        bool:mode    
  73. Set Pitch            ‘SPit’        shor:new pitch    
  74. Set Rate             ‘SRat’        shor:new rate    
  75. Set Volume       ‘SVol’        shor:new volume    
  76. Speak Text       ‘This’        TEXT:text    
  77. Speech Busy       ‘Busy’                    bool:result
  78. Use Dictionary       ‘Dict’        list:dictionary list    
  79.  
  80.  
  81. Spiricom Details
  82. Spiricom is an application designed to work in conjunction with SpokesDaemon. It is essentially useless if you don't have SpokesDaemon. Otherwise, it looks and acts like a normal Macintosh application.
  83.  
  84. When you launch Spiricom, it checks to see if the computer is running System 7 and has the Speech Manager extension loaded. If not, you are notified that there won't be much you can do with the program, and all the controls are disabled. Assuming your Mac passes both tests, it next checks the list of currently running processes to see if SpokesDaemon is already running, and if it is, sends it a series of Apple events to determine its current configuration.  Let's pick up the user interface at this point in the story.
  85.  
  86. If SpokesDaemon is found in the list of running processes, the 'Contact made' message is displayed in the status window; if not, 'Off' will appear and the power light will be red. Also, no controls will function. 
  87. Spiricom's window presents several controls which are your mechanism for configuring SpokesDaemon. When you move and release the Volume slider, an Apple event is sent to SpokesDaemon with the new value for it to use for volume. Very simple, but elegant (IMHO.) Most of the controls are pretty self explanatory, but I'll cover them here in minor detail.
  88.  
  89. The Power indicator and button.
  90. If the light is red, SpokesDaemon is not running; if it's green, it is running. If the button is red and you press it, a dialog box will appear asking you to find the application. Spiricom will then try to launch it. Conversely, if it is already running, pressing the button will send SpokesDaemon a 'quit' Apple event. 
  91.  
  92. The voice which will be used to synthesize speech. 
  93. The list is built from the voices loaded in the System Folder at the time the application was launched. 
  94.  
  95. The character processing mode switch.
  96. When the switch is in the Normal position, text will be read normally. If it is in the Literal position, words will be spoken character-by-character. 'SpokesDaemon' would be spoken 'Capital S-p-o-k-e-s-Capital D…'
  97.  
  98. The number processing mode switch.
  99. When the switch is in the Normal position, numbers will be read as you would say them. For example, '123' would be pronounced 'One hundred twenty-three.' If it is in the Literal position, it would be pronounced 'One-two-three.'  
  100.  
  101. The modulation slider. 
  102. The pitch slider. 
  103. The rate slider. 
  104. The volume slider.
  105. All four sliders operate as you would expect. Modulation is a good way to control the amount of 'emotion' in a voice. Higher pitches sound more like 'squealing.' Rate is an approximation of number of words per minute. Theoretically, there is no upper bound, but I couldn't recognize anything at over 400 wpm, so that's were the upper limit is set. Volume is, well, volume. It is independent of the Sound Control Panel's volume slider. No, there is no '11' setting. 
  106.  
  107. The test pit.
  108. You can play with the controls and then type in some text here to see how it sounds using your settings. Press the 'Speak' button when you want to hear the text read back, and when it gets boring, press the 'Quiet' button. 
  109.  
  110. The dictionary button.
  111. One of the nice features of the Speech Manager is that if you don't like the way a synthesizer pronounces your name, it provides a mechanism for you to change it's pronunciation. You can do this by adding a 'dictionary' resource. To add a dictionary, press this button, and use the file dialog box to find the file with the 'dict' resource you want to add. (Note: currently, SpokesDaemon will only look for 'dict' resources with an id of 1.) 
  112.  
  113. The annoying button.
  114. When the Greeting switch is on, SpokesDaemon will say hello and tell you the time and date when it is launched. Currently, this is the easiest way to tell if it was successfully launched.
  115.  
  116. Other Information
  117. These applications are released 'as is.' The author is not responsible for any damage, destruction or loss of data caused by its use. SpokesDaemon and Spiricom are shareware. The requested charge for both is $40., however, any amount would be appreciated. Software companies interested in licensing these applications should contact me directly to arrange terms. My addresses are: 
  118.     Eric Weidl
  119.     142 N. 11th Ave.
  120.     St. Charles, IL 60174
  121.  
  122.     Internet:        e-weidl@uchicago.edu
  123.     AppleLink:    HATCHERY
  124. If you have any problems, suggestions or comments, I would love to hear them. If you are reporting a bug, please give me as detailed information as you possibly can. I'll even look at MacsBug dumps (sc6 and sc7 are particularly helpful!) I'll be able to respond more quickly if you contact me by email.
  125.  
  126. SpokesDaemon and Spiricom were written in Novell's Visual AppBuilder (familiar to many by it's former title 'Serius Workshop'.) I've written a Speech ALM for AppBuilder using THINK C 5.0. If you have Serius Workshop and are interested in purchasing the ALM (or 'object' as they were called by Serius) send me some email.
  127.  
  128. C O P Y R I G H T   N O T I C E
  129. Copyright © Eric J. Weidl, 1993. All Rights Reserved.
  130.  
  131. Bulletin Board Services/Shareware CD–ROMs
  132. This package may be distributed on BBSes or CD–ROMs as is. It must include this document and either Control Panel or document may not be modified in any way. The software may not be sold or distributed for profit, or included with other software which is sold or distributed for profit, without the written permission of the author. I understand that CD–ROM distributors have to recover the cost of producing the CD–ROM, so charging for it's distribution under such circumstances is permitted. I would love to see this software distributed and used as widely as possible!
  133.  
  134. Bugs
  135.    • The 'SpekDict' Apple event is supposed to pass a list of documents to be opened. SpokesDaemon will currently only open the first document.
  136.    • Similarly, SpokesDaemon will only look for 'dict' resources with an id of 1.
  137.    • The Greeting switch does not always reflect the correct state.
  138.  
  139. Version History
  140. SpokesDaemon
  141. 1.0  (Oct 1, 1993)       First public release.
  142. 1.0b4  (Sep 27, 1993)    Fixed a problem with the volume slider not being set properly when the voice was changed. 
  143. 1.0b3  (Sep 24, 1993)    Added an ‘aete’ resource. SpokesDaemon is now scriptable! Also fixed a problem with the Greeting switch. 
  144. 1.0b2  (Sep 20, 1993)    Unreleased version. Fixed several problems with the Apple event support. Works properly and consistently with FileMaker Pro and Excel.
  145. 1.0b1  (Sep 17, 1993)    Initial beta release, several weeks after I told people it would be ready.
  146.  
  147. Spiricom
  148. 1.0.1  (Oct 19, 1993)    Fixed small bug in the About window routine.
  149. 1.0  (Oct 1, 1993)       First public release.
  150. 1.0b3  (Sep 27, 1993)    Fixed a dumb bug in the volume slider.  Also fixed a problem with the voice pop-up menu not being set correctly if the daemon was running when Spiricom was launched.
  151. 1.0b2  (Sep 20, 1993)    Made identical Apple event changes to Spiricom that I made to SpokesDaemon.  
  152. 1.0b1  (Sep 17, 1993)    Initial beta release.
  153.  
  154.